<template>
  <div class="yuekangmaBox">
    <div class="topBox1"></div>
    <div class="topBox2"></div>
    <div class="topBox3"></div>

    <image src="https://qqposs.oss-cn-shenzhen.aliyuncs.com/website/yuekangma.jpg" mode="widthFix" style="width:100vw;height:auto;" />
    <div class="fz-18 posab2 fw6">
      <div>{{address || '元匠坊'}}</div>
      <div class="fz-12 viceColor"><text class="u-p-r-8">廖*新</text>{{newTime}}</div>
    </div>

    <u-popup v-model="show" mode="center">
		<view>
      <view class="u-p-t-30 u-p-b-30">
			  <input v-model="address"/>
      </view>
      <u-button type="primary" @click="show = false">确定</u-button>
		</view>
	</u-popup>
  </div>
</template>

<script>
export default {
  data(){
    return {
      newTime: "",
      show: true,
      address: "",
    }
  },
  onLoad(){
    uni.setNavigationBarColor({
      frontColor: "#ffffff",
      backgroundColor: "#ffffff",
      animation: {
        duration: 0,
        timingFunc: "easeIn",
      },
    });
    setInterval(() => {
      var date = new Date(); // 获取当前时间
      var year = date.getFullYear(); // 年
      var month = date.getMonth() + 1; // 月
      var day = date.getUTCDate(); // 日
      var hours = date.getHours(); // 时
      var min = date.getMinutes(); // 分
      var sec = date.getSeconds(); // 秒
      if (month < 10) month = '0' + month
      if (day < 10) day = '0' + day
      if (hours < 10) hours = '0' + hours
      if (min < 10) min = '0' + min
      if (sec < 10) sec = '0' + sec
      this.newTime = year + '-' + month + '-' + day + ' ' + hours + ':' + min
    }, 1000);
  }
}
</script>
<style scoped>
.yuekangmaBox{
  position: relative;
  min-height: 100vh;
}
.posab2{
  position: absolute;
  background: #FFF;
  top: 23.5vh;
  left: 0;
  color: #000;
  font-weight: 500;
  padding-top: 28rpx;
  padding-bottom: 8rpx;
  margin: 0 70rpx;
  width: calc(100% - 140rpx);
  text-align: center;
  z-index: 999;
}
.topBox1{
  background-color: #4592f2;
  width: 100%;
  height: 60rpx;
  position: absolute;
  top: 0;
  left: 0;
}
.topBox2{
  background-color: #4592f2;
  width: 250rpx;
  height: 80rpx;
  position: absolute;
  right: 0;
  top: 60rpx;
}
.topBox3{
  background-color: #4592f2;
  width: 100%;
  height: 100rpx;
  position: fixed;
  left: 0;
  bottom: 0;
}
</style>